< previous page page_151 next page >

Page 151
Table 7.2 Relational Operators.
OperatorDescriptionExample
Less than (<)Is the first operand less than the second?4 < 3 = False
Less than or equal to (<=)Is the first operand less than or equal to the second?4 <= 3 = False
Greater than (>)Is the first operand greater than the second?4 > 3 = True
Greater than or equal to (>=)Is the first than or equal to the second?4 >= 3 = True(>=)
Equal to (=)Is the first operand equal to the second?4 = 3 = False
Not equal to (<>)Is the first operand not equal to the second?4 <> 3 = True

Order of Precedence
If several operators occur in an expression, each part is evaluated and resolved in a predetermined order known as operator precedence. If you place parentheses around any of the expressions, operations within the parentheses are performed first, from the innermost to the outermost parentheses. If theres more than one operator of the same type, they are evaluated in the order they occur, from left to right. Heres a list in the order that an expression with multiple operators would be evaluated:

 
< previous page page_151 next page >

If you like this book, buy it!